package com.ios.enums;
/**
*@Author:WenTao
*@Description:关注状态枚举类型
*@Date:9:07 2018/7/19
*/
public enum AttentionStateEnum {
    A_SUCCESSS(10,"关注成功")
    ,A_FAIL(01,"关注失败")
    ,UA_SUCCESS(11,"取关成功")
    ,UA_FAIL(02,"取关失败")
    ,REPEAT(03,"已关注")
    ,NULL(04,"用户不存在")
    ,ERROR_ATTENTION(05,"不存在该条关注信息");

    private int state;
    private String stateInfo;

    AttentionStateEnum(int state, String stateInfo) {
        this.state = state;
        this.stateInfo = stateInfo;
    }

    /*根据传入的state返回对应的enum值*/
    public static AttentionStateEnum stateof(int state){
        for (AttentionStateEnum stateEnum : values()){
            if (stateEnum.getState() == state){
                return stateEnum;
            }
        }
        return null;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }
}
